#include"../../client/Rpc_Client.hpp"


void func(const std::string &key, const std::string &msg)
{
    LOG(LogLevel::INFO)<<"key :" <<key <<"  msg: "<<msg;
}


int main()
{
    xu::client::TopicClient::Ptr topicclient = std::make_shared<xu::client::TopicClient>("127.0.0.1",8989);
    topicclient->Create("xuzhengyou");
    topicclient->Subscribe("xuzhengyou",func);

    sleep(15);
    topicclient->Cancel("xuzhengyou");
    sleep(60);
    topicclient->Shutdown();
    return 0;
}
